package com.hzsk.lisence.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Description :
 * @Date : 2024/8/15
 * @Author : ChenJin
 * @Version : v1.0.0
 **/
@Getter
@AllArgsConstructor
public enum ChannelEnum {

    OneChannel("OneChannel","单通道"),

    TwoChannel("TwoChannel","双通道"),

    FourChannel("FourChannel","四通道"),

    EightChannel("EightChannel","八通道");

    private final String code;

    private final String name;

    public static String getNameByCode(String code){
        for (ChannelEnum channelEnum:ChannelEnum.values()){
            if (channelEnum.getCode().equals(code)){
                return channelEnum.getName();
            }
        }
        return null;
    }

}
